package com.houxr.scheduler.elasticjobs;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 当当分布式左右任务
 * Created by houxiurong on 2017/9/18.
 */
@Component
public class MyElasticJobScheduler0 implements SimpleJob {

    private final Logger logger = LoggerFactory.getLogger(MyElasticJobScheduler0.class);

    public void execute(ShardingContext shardingContext) {
        doSomething();
    }

    public String doSomething() {
        logger.info("====[0].do something by sharding item 0====");
        return "";
    }
}
